<?php

class FV_FormatEmail {
	
	private $error = null;
	
	public function __construct(){
		$this->error = 'La chaîne ne correspond pas à un format email valide.';
	}
	
	public function getError(){
		return $this->error;
	}
	
	public function test($value){
		$SyntaxeEmail='#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#'; 

		return preg_match($SyntaxeEmail,$value);
	}
	
}